function main() {
    debugger

    const self = this;

    let regionIdValue = self.$$("tree_single_select_551mpk").cValue;
    const stallOrganizationCode = self.$$("text_input_37yviy").cValue || "";

    const params = [{
        name: "regionId",
        valueContent: regionIdValue
    }];

    const regionCodeEle = this.$$m("text_input_dix8v2");
    const regionNameEle = this.$$m("text_input_c538u4");

    api.DATA_SOURCE_EXECUTE("ds_mod:72c1a80e-bec8-417e-b315-072b833fc4a7", "ddcat", params, [], "").then(res => {
        console.log(res);
        if (!res.hasError) {
            regionCodeEle.props.defaultValue.value = res.result.code;
            regionNameEle.props.defaultValue.value = res.result.name;
            const paramsAPI = [{
                name: "stall_organization_code",
                valueContent: stallOrganizationCode
            }, {
                name: "regionCode",
                valueContent: result.code
            }];

            api.DATA_SOURCE_EXECUTE("ds_api:99936bfb-fa07-49ba-83b0-e4de71960348", "api", paramsAPI, [], "").then((res) => {
                if (!res.hasError) {
                    self.$$m("text_input_37yviy").props.defaultValue.value = JSON.parse(res.result).result;
                }
            });
        }

    });

}

